﻿<Window x:Class="SAF.Framework.Controls.Upgrade.UpgradeWizard"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="软件升级中心" Height="385" Width="524" ResizeMode="NoResize" 
        xmlns:my="clr-namespace:System;assembly=mscorlib" 
        Closing="Window_Closing" WindowStartupLocation="CenterScreen">
    <Grid Margin="5">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="142" />
            <ColumnDefinition Width="301*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="20" />
            <RowDefinition Height="190*" />
            <RowDefinition Height="22" />
            <RowDefinition Height="20" />
            <RowDefinition Height="28" />
        </Grid.RowDefinitions>
        <Image Grid.RowSpan="5" Grid.Column="0" Grid.Row="0"  Name="imgLogo" Stretch="Fill" Source="pack://Application:,,,/Images/logoPictureBox.png" />

        <TextBlock Grid.Column="1" Grid.Row="0"  Name="txtMessage" Text="系统以下文件已有新版本发布：" VerticalAlignment="Center" Margin="2" />
        <DataGrid AutoGenerateColumns="False" Grid.Column="1" Grid.Row="1"  Margin="2" Name="dgDownloadList" CanUserAddRows="False" CanUserDeleteRows="False"
                  CanUserResizeRows="False" CanUserReorderColumns="False" CanUserSortColumns="False" IsReadOnly="True" SelectionMode="Single">
            <DataGrid.Columns>
                <DataGridTextColumn Header="文件名称" Binding="{Binding FileName}" />
                <DataGridTextColumn Header="版本" Binding="{Binding Version}"/>
                <DataGridTextColumn Header="大小" Binding="{Binding ConversionSize}" />
                <DataGridTextColumn Header="状态" Binding="{Binding State}"/>
            </DataGrid.Columns>
        </DataGrid>
        <TextBlock Margin="2" Name="txtCurrentFile" Text="正在更新文件：" VerticalAlignment="Center" Grid.Column="1" Grid.Row="2" />
        <ProgressBar Grid.Column="1" Grid.Row="3"  Name="pbDownloadProgress" Margin="2" />
        <Button Content="立即更新[_U]" Grid.Column="1" Grid.Row="4"  HorizontalAlignment="Right" Margin="0,2,82,2" Name="btnUpdate" VerticalAlignment="Center"  Width="75" Click="btnUpdate_Click" IsDefault="True" />
        <Button Content="下次再说[_N]" Grid.Column="1" Grid.Row="4"  HorizontalAlignment="Right" Margin="2,2,2,2" Name="btnExit" VerticalAlignment="Center" Width="75" IsCancel="True" />
    </Grid>
</Window>
